<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>test_tag_link_list (KarakuriTest)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File test/karakuri_test.rb, line 39</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_tag_link_list</span>
    <span class="ruby-identifier">result_nil</span> = <span class="ruby-constant">Karakuri</span><span class="ruby-operator">::</span><span class="ruby-identifier">tag_link_list</span>(<span class="ruby-keyword kw">nil</span>)
    <span class="ruby-identifier">assert</span>(<span class="ruby-value str">&quot;Unexpected mapping for nil!&quot;</span>, <span class="ruby-identifier">result_nil</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>)
    <span class="ruby-identifier">result_00</span> = <span class="ruby-constant">Karakuri</span><span class="ruby-operator">::</span><span class="ruby-identifier">tag_link_list</span>(<span class="ruby-constant">STRING_00</span>)
    <span class="ruby-identifier">assert</span>(<span class="ruby-node">&quot;Unexpected mapping for #{STRING_00}!&quot;</span>, <span class="ruby-identifier">result_00</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>)
    <span class="ruby-identifier">result_01</span> = <span class="ruby-constant">Karakuri</span><span class="ruby-operator">::</span><span class="ruby-identifier">tag_link_list</span>(<span class="ruby-constant">STRING_01</span>)
    <span class="ruby-identifier">assert</span>(<span class="ruby-node">&quot;Unexpected mapping for #{STRING_01}!&quot;</span>, <span class="ruby-identifier">result_01</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&lt;a href=/tagged?tag=tag_1 &gt;tag_1&lt;/a&gt; &quot;</span>)
    <span class="ruby-identifier">result_02</span> = <span class="ruby-constant">Karakuri</span><span class="ruby-operator">::</span><span class="ruby-identifier">tag_link_list</span>(<span class="ruby-constant">STRING_02</span>)
    <span class="ruby-identifier">expected_result_02</span> = <span class="ruby-value str">%{&lt;a href=&quot;/tagged?tag=tag_1&quot; alt=&quot;articles concerning tag_1&quot; &gt;tag_1&lt;/a&gt; &lt;a href=&quot;/tagged?tag=tag_2&quot; alt=&quot;articles concerning tag_2&quot; &gt;tag_2&lt;/a&gt; }</span>
    <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">result_02</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">expected_result_02</span>, <span class="ruby-node">&quot;Unexpected mapping for #{STRING_02}!&quot;</span>)
    <span class="ruby-identifier">result_03</span> = <span class="ruby-constant">Karakuri</span><span class="ruby-operator">::</span><span class="ruby-identifier">tag_link_list</span>(<span class="ruby-constant">STRING_03</span>)
    <span class="ruby-identifier">expected_result_03</span> = <span class="ruby-value str">%{&lt;a href=&quot;/tagged?tag=tag_1&quot; alt=&quot;articles concerning tag_1&quot; &gt;tag_1&lt;/a&gt; &lt;a href=&quot;/tagged?tag=tag_2&quot; alt=&quot;articles concerning tag_2&quot; &gt;tag_2&lt;/a&gt; &lt;a href=&quot;/tagged?tag=tag_3&quot; alt=&quot;articles concerning tag_3&quot; &gt;tag_3&lt;/a&gt; }</span>
    <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">result_03</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">expected_result_03</span>, <span class="ruby-node">&quot;Unexpected mapping for #{STRING_03}!&quot;</span>)
    <span class="ruby-identifier">result_04</span> = <span class="ruby-constant">Karakuri</span><span class="ruby-operator">::</span><span class="ruby-identifier">tag_link_list</span>(<span class="ruby-constant">STRING_04</span>)
    <span class="ruby-identifier">expected_result_04</span> = <span class="ruby-value str">%{&lt;a href=&quot;/tagged?tag=hacks&quot; alt=&quot;articles concerning hacks&quot; &gt;hacks&lt;/a&gt; &lt;a href=&quot;/tagged?tag=love&quot; alt=&quot;articles concerning love&quot; &gt;love&lt;/a&gt; &lt;a href=&quot;/tagged?tag=rock 'n' roll&quot; alt=&quot;articles concerning rock 'n' roll&quot; &gt;rock 'n' roll&lt;/a&gt; }</span>
    <span class="ruby-identifier">assert</span>(<span class="ruby-identifier">result_04</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">expected_result_04</span>, <span class="ruby-node">&quot;Unexpected mapping for #{STRING_04}!&quot;</span>)
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>